{extend name="public/base"}

{block name="x-body"}
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" method="get">
          <input class="layui-input" placeholder="开始日" name="start" value="{$search_key.start}" id="start">
          <input class="layui-input" placeholder="截止日" name="end" value="{$search_key.end}" id="end">
          <div class="layui-input-inline">
            <select name="invoice_title">
              <option value="">发票类型</option>
              <option value="0" {$search_key.invoice_title === '0' ? 'selected' : ''}>个人</option>
              <option value="1" {$search_key.invoice_title == 1 ? 'selected' : ''}>公司</option>
            </select>
          </div>
          <input type="text" name="order_sn"  placeholder="请输入订单号" autocomplete="off" class="layui-input" value="{$search_key.order_sn}">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock style="height: 40px;">
        <span class="x-right" style="line-height:40px">共有数据：{$list -> total()} 条</span>
      </xblock>
      <table class="layui-table layui-form">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>id</th>
            <th>订单编号</th>
            <th>发票抬头</th>
            <th>纳税人类型</th>
            <th>纳税人识别号</th>
            <th>发票状态</th>
            <th>金额</th>
            <th >操作</th>
            </tr>
        </thead>
        <tbody>
          {volist name="list" id="v"}
          <tr>
            <td>
              <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$v.id}'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$v.id}</td>
            <td>{$v.order_sn}</td>
            <td>{$v.invoice_title ? '公司' : '个人'}</td>
            <td>{$v.taxpayer_type ? '非增值税' : '增值税'}</td>
            <td>{$v.taxpayer}</td>
            <td>
              {if $v.status == 1}
              未开发票
              {elseif $v.status == 0 /}
              不开发票
              {elseif $v.status == 2 /}
              暂不开票
              {elseif $v.status == 3 /}
              已开发票
              {/if}
            </td>
            <td>{$v.price}</td>
            <td class="td-manage">
              <a title="开发票"  onclick="x_admin_show('开发票','{:url(\'finance/invoice_cat\', [\'id\' => $v.oid])}')" href="javascript:;">
                <i class="layui-icon">&#xe63c;</i>
              </a>
            </td>
          </tr>
          {/volist}
        </tbody>
      </table>
      <div class="page">
        {$list -> render()|raw}
      </div>

    </div>
{/block}